/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.ytbolg.mcxa.Output;

import java.util.Calendar;
import java.util.Date;

/**
 *
 * @author root
 */
public class Logger {

    private int mt = 0;
    public static final int Info = 0;
    public static final int Error = 1;

    public Logger(int MessageType) {
        mt = MessageType;
    }

    public void setType(int t) {
        mt = t;
    }

    public void Log(String Msg) {
        Calendar c = Calendar.getInstance();
        String time = "";
        time = c.get(Calendar.HOUR_OF_DAY) + ":" + c.get(Calendar.MINUTE) + ":" + c.get(Calendar.SECOND);
        time = "[" + time + "]";
        String type = "";
        if (mt == 0) {
            type = "INFO";
        } else if (mt == 1) {
            type = "ERROR";
        }
        System.out.println(time + "[" + type + "]" + Msg);

        //    new Date().get
    }


}
